﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GestionAutoEcole.DAO.Impl;

namespace GestionAutoEcole.DAO.Factory
{
    public class DAOFactory : AbstractDAOFactory
    {
        private static volatile DAOFactory instance;
        private static object syncRoot = new Object();

        private DAOFactory() { }

        public static DAOFactory getInstance()
        {
            if (instance == null)
            {
                lock (syncRoot)
                {
                    if (instance == null)
                        instance = new DAOFactory();
                }
            }

            return instance;
        }

        public CoursDaoImpl getCoursDaoImpl()
        {
            CoursDaoImpl coursDao = CoursDaoImpl.getInstance();
            return coursDao;
        }

        public DatePermisDaoImpl getDatePermisDaoImpl()
        {
            DatePermisDaoImpl coursDao = DatePermisDaoImpl.getInstance();
            return coursDao;
        }

        public DocumentDaoImpl getDocumentDaoImpl()
        {
            DocumentDaoImpl coursDao = DocumentDaoImpl.getInstance();
            return coursDao;
        }

        public EleveDaoImpl getEleveDaoImpl()
        {
            EleveDaoImpl coursDao = EleveDaoImpl.getInstance();
            return coursDao;
        }

        public EleveExamenDaoImpl getEleveExamenDaoImpl()
        {
            EleveExamenDaoImpl coursDao = EleveExamenDaoImpl.getInstance();
            return coursDao;
        }

        public EmployeeDaoImpl getEmployeeDaoImpl()
        {
            EmployeeDaoImpl coursDao = EmployeeDaoImpl.getInstance();
            return coursDao;
        }

        public ExamenDaoImpl getExamenDaoImpl()
        {
            ExamenDaoImpl coursDao = ExamenDaoImpl.getInstance();
            return coursDao;
        }

        public ExaminateurDaoImpl getExaminateurDaoImpl()
        {
            ExaminateurDaoImpl coursDao = ExaminateurDaoImpl.getInstance();
            return coursDao;
        }

        public FonctionDaoImpl getFonctionDaoImpl()
        {
            FonctionDaoImpl coursDao = FonctionDaoImpl.getInstance();
            return coursDao;
        }

        public LeconDaoImpl getLeconDaoImpl()
        {
            LeconDaoImpl coursDao = LeconDaoImpl.getInstance();
            return coursDao;
        }

        public PermisDaoImpl getPermisDaoImpl()
        {
            PermisDaoImpl coursDao = PermisDaoImpl.getInstance();
            return coursDao;
        }

        public VehiculeDaoImpl getVehiculeDaoImpl()
        {
            VehiculeDaoImpl coursDao = VehiculeDaoImpl.getInstance();
            return coursDao;
        }

    }
}
